For image capturing apparatuses, such as digital still cameras and video cameras, a solid-state image sensor is proposed in which part or all of pixels are ranging pixels having a distance measuring function (hereinafter referred to as ranging pixels). Such a solid-state image sensor can measure distance by a phase-difference detection method. The phase-difference detection method is a method for measuring distance by triangulation using a stereo image of light that has passes through different areas on the pupil of an imaging optical system. Unlike a conventional contrast method, the phase-difference detection method does not need to move a lens to measure distance, thus allowing high-speed high-precision autofocusing. The phase-difference detection method also allows real-time autofocusing at video recording.
In PTL 1, light that has passed through different areas of the pupil of a taking lens is collected to a plurality of different photoelectric conversion units with a pupil-dividing microlens. Thus, distance can be measured on the basis of signals detected at the different photoelectric conversion units of the ranging pixels. The signals detected at the plurality of photoelectric conversion units are combined for use as the values of the ranging pixels for generating a captured image.